<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="robots" content="all" />
<meta name="author" content="Neaton" />
<meta name="Copyright" content="mr-fang.com" />
<meta name="Description" content="/>
<meta name="Keywords" content=""/>
<title>最新照片 - mr-fang.com</title>
{literal}
<style>
body,div,form,img,p,ul,ol,li,dl,dt,dd,embed,h1,h2,h3,h4,h5,h6,td,tr,span,fieldset,label,legend{margin:0; padding:0; border:0;}
body{color:#595959;font-family:Verdana,Tahoma,Helvetica,Arial,"宋体";font-size:12px;line-height:22px;background:url('/misc/images/bg.jpg');}
a{text-decoration:none;color:#000000}
#main{width:100%;padding:0;text-align:center}
#nav{margin-top:65px}
#nav .current{color:#993300}
a:hover{color:#993300}
#content{margin-top:25px;width:937px}
#logo{margin-top:15px;}
#footer{margin-top:10px;color:#000000}
#hr{height:1px;line-height:1px;width:600px;background-color:gray;}
#cates, #lists{float:left;}
#cates {width:20%}
#lists{width:80%}
.messageBox{text-align:left;width:50%;}
.messageBox td{border-bottom:1px solid gray;}
.focus{ overflow:hidden; width:583px; height:326px; margin-right:6px;margin-top:20px;}
#focus_turn{width:583px;height:326px; position:relative;}
    #focus_pic li img{width:583px;height:326px;}
    #focus_pic .current{display:block;}
    #focus_pic .normal{display:none;}
    #focus_opacity{position:absolute;left:0px;bottom:0px;height:28px;filter:alpha(opacity=40);opacity:0.4;width:140px; background-color:#000;z-index:8px;}
    #focus_opacity_c{position:absolute;left:143px;bottom:0px;height:28px;filter:alpha(opacity=40);opacity:0.4;width:440px; background-color:#000;z-index:8px;}
    #focus_btn{position:absolute;left:0px;bottom:0px;width:140px; height:28px; line-height:28px;z-index:9px;}
    #focus_btn span{ float:left; display:inline;color:#FFF;font-weight:bold;font-size:14px;padding:0 8px; cursor:pointer;}
    #focus_btn .current{ color:#F90;}
    #focus_tx{position:absolute;left:150px;bottom:0px;height:28px; line-height:28px;font-size:14px;z-index:10px;color:#FFF;}
    #focus_tx a{color:#FFF; text-decoration:none;}
    #focus_tx a:hover{ text-decoration:underline;}
    #focus_tx .current{display:block;}
    #focus_tx .normal{display:none;}
</style>
{/literal}
</head>
<body>

<div id="main">
    <div id="nav">
        {foreach from=$firstLevelCates item=c}
        <a href="{$c.c_link}" {if $controllerName eq $c.c_controller}class="current"{/if}>{$c.c_title}</a>
        {/foreach}
    </div>

    <center>
    <div id="content">
        <div id="cates">
            <img src="/misc/images/photo_logo.gif">
            <div><a href="/photo/news">最新</a></div>
            {foreach from=$cates item=c}
            <div><a href="/photo/list?cid={$c.cid}">{$c.c_title}</a></div>
            {/foreach}
        </div>
        <div id="lists">
            <div class="focus">
            <script>
            var flink = {$aids};
            var fimg = {$photos};
            var ftitle = {$titles};
            </script>
            <div id="focus_turn">
            <ul id="focus_pic">
                {literal}
                <script>
                for(var j=0; j<fimg.length; j++) {
                    var cla = j == 0 ? 'current' : 'normal';
                    document.writeln('<li class="'+cla+'"><a href="/photo/view?aid='+flink[j]+'" target="_blank"><img alt="'+ftitle[j]+'" src="'+fimg[j]+'" title="'+ftitle[j]+'" alt="'+ftitle[j]+'"/></a></li>');
                }
                </script>
                {/literal}
            </ul>
            <div id="focus_opacity"></div>
            <div id="focus_opacity_c"></div>
            <ul id="focus_tx">
                {literal}
                <script>
                for(var j=0; j<ftitle.length; j++) {
                    var cla = j == 0 ? 'current' : 'normal';
                    document.writeln('<li class="'+cla+'"><a href="/photo/view?aid='+flink[j]+'" target="_blank">'+ftitle[j]+'</a></li>');
                }
                </script>
                {/literal}
            </ul>
            </div>

            </div>
            <table width="80%">
            <tr><th colspan="2" align="left">近期活动<th></tr>
            {foreach from=$articles item=a}
            <tr>
                <td width="80%" style="padding-left:20px;text-align:left"><a href="/photo/view?aid={$a.aid}">{$a.a_title}</a></td>
                <td>{$a.a_published}</td>
            </tr>
            {/foreach}
            </table>
        </div>
    </div>

    <div style="clear:both"></div>
    <div id="footer">
        <table class="messageBox" align="center"><tr><td style="border:0">
        <span style="float:left"><img src="/misc/images/little_logo.gif"></span>
        <span style="float:right">
        <a target="_blank" href="http://wpa.qq.com/msgrd?v=1&uin=1175766980&site=qq&menu=yes">
        <img border="0" src="http://wpa.qq.com/pa?p=2:1175766980:41" alt="点击这里发消息" title="点击这里发消息">
        </a>

        <a target="_blank" href="http://wpa.qq.com/msgrd?v=1&uin=948073336&site=qq&menu=yes">
        <img border="0" src="http://wpa.qq.com/pa?p=2:948073336:41" alt="点击这里发消息" title="点击这里发消息">
        </a>
        </span>
        </td></tr></table>
        <div id="hr">&nbsp;</div>
        <div>
            {$intro.i_shopname}地址：{$intro.i_address}<br />
            电话：{$intro.i_telphone}<br />
        </div>
    </div>
    </center>
</div>

{literal}
<script>
//焦点图片轮换
function $(id) { return document.getElementById(id); }

function addLoadEvent(func){
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function(){
            oldonload();
            func();
        }
    }
}

function addBtn() {
    if(!$('focus_turn')||!$('focus_pic')||!$('focus_tx')) return;
    var focusList = $('focus_pic').getElementsByTagName('li');
    if(!focusList||focusList.length==0) return;
    var btnBox = document.createElement('div');
    btnBox.setAttribute('id','focus_btn');
    var SpanBox ='';
    for(var i=1; i<=focusList.length; i++ ) {
        var spanList = '<span class="normal">'+i+'</span>';
        SpanBox += spanList;
    }
    btnBox.innerHTML = SpanBox;
    $('focus_turn').appendChild(btnBox);
    $('focus_btn').getElementsByTagName('span')[0].className = 'current';
}

function classNormal(){
    var focusList = $('focus_pic').getElementsByTagName('li');
    var btnList = $('focus_btn').getElementsByTagName('span');
    var txList = $('focus_tx').getElementsByTagName('li');
    for(var i=0; i<focusList.length; i++) {
        focusList[i].className='normal';
        btnList[i].className='normal';
        txList[i].className='normal';
    }
}

function classCurrent(n){
    var focusList = $('focus_pic').getElementsByTagName('li');
    var btnList = $('focus_btn').getElementsByTagName('span');
    var txList = $('focus_tx').getElementsByTagName('li');
    focusList[n].className='current';
    btnList[n].className='current';
    txList[n].className='current';
}

var autoKey = false;
function btnTurn() {
    if(!$('focus_turn')||!$('focus_pic')||!$('focus_tx') || !$('focus_btn')) return;
    $('focus_turn').onmouseover = function(){autoKey = true};
    $('focus_turn').onmouseout = function(){autoKey = false};
    var focusList = $('focus_pic').getElementsByTagName('li');
    var btnList = $('focus_btn').getElementsByTagName('span');
    var txList = $('focus_tx').getElementsByTagName('li');
    for (var m=0; m<btnList.length; m++){
        btnList[m].onmouseover = function() {
            classNormal();
            this.className='current';
            var n=this.childNodes[0].nodeValue-1;
            focusList[n].className='current';
            txList[n].className='current';
        }
    }
}

addLoadEvent(addBtn);
addLoadEvent(btnTurn);
addLoadEvent(setautoturn);

function setautoturn() {
    setInterval('autoTurn()', 4000);
}

function autoTurn() {
    if(!$('focus_turn')||!$('focus_pic')||!$('focus_tx')) return;
    if (autoKey) return;
    var focusList = $('focus_pic').getElementsByTagName('li');
    var btnList = $('focus_btn').getElementsByTagName('span');
    var txList = $('focus_tx').getElementsByTagName('li');
    for(var i=0; i<focusList.length; i++) {
        if (focusList[i].className == 'current') {
            var currentNum = i;
        }
    }
    if (currentNum==focusList.length-1 ){
        classNormal();
        classCurrent(0);
    } else {
        classNormal();
        classCurrent(currentNum+1);
    }

}
</script>
{/literal}
